---@class BuffEffect44 : BaseBuffEffect
BuffEffect44 = ClientFight.CreateClass("BuffEffect44", ClientFight.BaseBuffEffect)
local t = BuffEffect44

---@param fight Fight
---@param buff FighterBuff
function t:action(fight, buff, ...)
    local parameters = { ... }
    ---@type FightResult
    local fightResult = parameters[3];
    local fighter = buff.target;
    local damage = fightResult:getDamage();
    if (damage <= 0) then
        return IBuffEffect.FAIL;
    end
    if (not AttackUtils.isDamage(fightResult:getState())) then
        return IBuffEffect.FAIL;
    end
    if (fightResult:getDamage() >= buff.target.hp ) then--//一刀能砍死我
    fightResult:setState(DamageResultTypeEnum.IMMUNITY);
    fightResult:setDamage(0);
    --LogUtil.info(fight, ()-> String.format("[%s][EFFECT]Fighter %s Buff%s 免疫致死伤害%s",
    --fight.frame, fighter.fighterId, buff.modelId, damage));
    else
        return IBuffEffect.FAIL;
    end
    return ClientFight.BaseBuffEffect.action(self,fight, buff, ...);
end

t.New()